<!DOCTYPE html>
<html lang="{{ domain_data.language_code }}">
<head>
    <title>{% block page_title %}Learn {{ domain_data.language_uppercase }} - Free Interactive {{ domain_data.language_uppercase }} Tutorial{% endblock %}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="description" content="{{ domain_data.styled_domain }} is a free interactive {{ domain_data.language_uppercase }} tutorial for people who want to learn {{ domain_data.language_uppercase }}, fast." />
    <meta name="keywords" content="Learn,{{ domain_data.language_uppercase }},Tutorial,Interactive,Free" />
    <meta name="google-site-verification" content="cXWj61RCtO3fVP24Y7CO-nX0ba30tgdJYY8GGBactLI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta property="og:title" content="{% block ogtitle %}Learn {{ domain_data.language_uppercase }} - Free Interactive {{ domain_data.language_uppercase }} Tutorial{% endblock %}" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="{% block ogurl %}{{ domain_data.full_url }}{% endblock %}" />
    <meta property="og:image" content="{{ domain_data.full_url }}{{ domain_data.share_logo }}" />

    <link rel="icon" href="{{ domain_data.favicon }}" type="image/x-icon">

    <link rel="stylesheet" href="/static/css/codemirror.css">
    <link rel="stylesheet" href="/static/css/theme/xq-light.css">
    <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/prism-light.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/learnpython.css"/>

    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({
              google_ad_client: "ca-pub-3723950136133694",
              enable_page_level_ads: true
         });
    </script>
</head>
<body>

<nav class="navbar navbar-expand-lg bg-light navbar-light">

    <div class="container">
    <a class="navbar-brand" href="/">
        <img src="{{ domain_data.logo }}" style="height: 24px;" alt="{{ domain_data.language_uppercase }}"/>
    </a>

    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
            aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarNavDropdown">

        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a class="nav-link" href="/">Home <span class="sr-only">(current)</span></a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="/about">About</a>
            </li>

            <li class="nav-item">
                <a class="nav-link" href="https://www.learnx.org">Certify</a>
            </li>

            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="more-langs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    More Languages
                </a>
                <div class="dropdown-menu" aria-labelledby="more-langs">

                    {% for domain, data in all_data.items() %}
		                <a class="dropdown-item{% if domain_data.namespace == domain %} disabled{% endif %}" href="{{ data.full_url }}">{{ data.language_uppercase }}</a>
                    {% endfor %}

                </div>
              </li>

{#            <li class="nav-item mr-sm-2">#}
{#                <a class="nav-link" href="https://chrome.google.com/webstore/detail/technews/babfhcgjchdmjknpmbdpcfggaonhimlj?hl=en&authuser=0"><span style="color: limegreen; font-family: monospace; font-weight: 800; font-size: 16px" target="_blank">&lt;/&gt;</span> TechNews Extension</a>#}
{#            </li>#}


        {#
            <li class="nav-item mr-sm-2 dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    Sign In
                </a>
                <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink2">
                    <div id="status" style="color: red"></div>
                    <form method="post" class="form p-3" style="width: 270px">
                        <div class="form-group">
                            <input class="form-control" type="email" placeholder="E-mail" id="email" name="email">
                        </div>

                        <div class="form-group">
                            <input class="form-control" type="password" placeholder="Password" id="password" name="password">
                        </div>

                        <div class="form-group">
                            <button class="btn btn-primary btn-block" id="sign-in">Sign In</button>
                        </div>

                        <div class="text-center">Don't have an account? <a href="/signup">Sign Up</a>.</div>


                    </form>
                </div>
            </li>
         #}

        </ul>

        <ul class="navbar-nav">
	        <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="langs" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
			        <img src="/static/img/icon20x24px-exported-transparent.png" style="height: 20px" alt="Languages">
                </a>
                <div class="dropdown-menu" aria-labelledby="langs">
                    {% for language in languages %}
		                <a class="dropdown-item{% if language_code  == language %} disabled{% endif %}" href="/{{ language }}/">{{ language_names[loop.index0] }}</a><br>
		            {% endfor %}
                </div>
    	    </li>

            <li class="nav-item" style="padding-top: 10px">
                <a class="github-button" href="https://github.com/ronreiter/interactive-tutorials" data-icon="octicon-star"  aria-label="Star ronreiter/interactive-tutorials on GitHub">Star</a>
                <a class="github-button" href="https://github.com/ronreiter/interactive-tutorials/fork" data-icon="octicon-repo-forked" aria-label="Fork ronreiter/interactive-tutorials on GitHub">Fork</a>
            </li>


        </ul>

    </div>

    </div>

</nav>

<nav class="navbar-dark bg-primary navbar-expand-lg mb-3 d-none d-lg-block">

    <div class="container">
        <ul class="navbar-nav mr-auto">
            {% for domain, data in all_data.items() %}
                <li class="nav-item"><a class="nav-link{% if domain_data.namespace == domain %} active{% endif %}" href="{{ data.full_url }}">{{ data.language_uppercase }}</a></li>
            {% endfor %}
        </ul>

    </div>

</nav>

{#<div class="container mt-2">#}
{#        <!-- AddThis Button BEGIN -->#}
{#    <div class="addthis_toolbox addthis_default_style ">#}
{#        <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>#}
{#        <a class="addthis_button_tweet"></a>#}
{#        <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>#}
{#        <a class="addthis_counter addthis_pill_style"></a>#}
{#    </div>#}
{##}
{#    <script type="text/javascript">#}
{#        var addthis_config = {"data_track_clickback": true};#}
{#        var addthis_share = {"url": "http://learnpython.org"};#}
{#    </script>#}
{#    <script type="text/javascript"#}
{#            src="//s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4dafdfe6039782b1"></script>#}
{#    <!-- AddThis Button END -->#}
{#</div>#}


{% block content %}{% endblock %}

<script
  src="https://code.jquery.com/jquery-1.12.4.min.js"
  integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="
  crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>

<script src="/static/js/prism.js"></script>

<script async defer src="https://buttons.github.io/buttons.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" integrity="sha512-+4zCK9k+qNFUR5X+cKL9EIR+ZOhtIloNl9GIKS57V1MyNsYpYcUrUeQc9vNfzsWfV28IaLL3i96P9sdNyeRssA==" crossorigin="anonymous" />

<script src="/static/js/codemirror/codemirror.js"></script>
<script src="/static/js/codemirror/addon/edit/matchbrackets.js"></script>
<script src="/static/js/codemirror/mode/clike/clike.js"></script>
{% if domain_data.language == "go" %}<script src="/static/js/codemirror/mode/go/go.js"></script>{% endif %}
{% if domain_data.language == "python" %}<script src="/static/js/codemirror/mode/python/python.js"></script>{% endif %}
{% if domain_data.language == "perl" %}<script src="/static/js/codemirror/mode/perl/perl.js"></script>{% endif %}
{% if domain_data.language == "php" %}<script src="/static/js/codemirror/mode/php/php.js"></script>{% endif %}
{% if domain_data.language == "javascript" %}<script src="/static/js/codemirror/mode/javascript/javascript.js"></script>{% endif %}
{% if domain_data.language == "ruby" %}<script src="/static/js/codemirror/mode/ruby/ruby.js"></script>{% endif %}
{% if domain_data.language == "shell" %}<script src="/static/js/codemirror/mode/shell/shell.js"></script>{% endif %}
{% if domain_data.language == "sql" %}<script src="/static/js/codemirror/mode/sql/sql.js"></script>{% endif %}
<script src="/static/js/codemirror/mode/xml/xml.js"></script>
<script src="/static/js/codemirror/mode/css/css.js"></script>
<script src="/static/js/codemirror/mode/htmlembedded/htmlembedded.js"></script>
<script src="/static/js/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
<script src="/static/js/bootbox.min.js"></script>

{% if domain_data.language == "python" and domain_data.language_code == 'en'  %}
<script src="https://cdn.datacamp.com/datacamp-light-latest.min.js"></script>
<script src="/static/js/datacamp.js"></script>
{% endif %}

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-22741967-17', '{{ domain_data.namespace }}');
  ga('create', '{{ domain_data.analytics }}', '{{ domain_data.namespace }}');
  ga('send', 'pageview');

</script>

{#
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-22741967-17"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-22741967-17');
</script>

<script>
    $(function() {
        $("#sign-in").click(function() {
            var email = $("#email").val();
            var password = $("#password").val();

            $.ajax({
                url: "/signin",
                data: {
                    email: email,
                    password: password
                },
                success: function(data) {
                    if (data.status == "success") {
                        document.location.refresh();
                    } else {
                        $("#status").text("E-mail or password combination invalid.")
                    }
                }
            })
        });

        $("#sign-up").click(function() {

        });
    });
</script>

<script>
(function(w,i,d,g,e,t,s) {w[d]=w[d]||[];t=i.createElement(g);
	t.async=1;t.src=e;s=i.getElementsByTagName(g)[0];s.parentNode.insertBefore(t,s);
}(window, document, '_gscq', 'script', '//www.hellothere.io/widget/cYqedgvGuFe2EvXs.js'));
</script>
#}

{% block head %}{% endblock %}

</body>
</html>
